package com.ck.mybatis.plus.model.dto;

import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

/**
 * @Classname PageDTO
 * @Description TODO
 * @Date 2020/7/13 0:03
 * @Created by lpc
 */
public class PageDTO {

    @ApiModelProperty("当前页码数")
    private Integer pageNum = 1;
    @ApiModelProperty("每页记录条数")
    private Integer pageSize = 10;

    public PageDTO() {
    }

    public Integer getPageNum() {
        return this.pageNum;
    }

    public Integer getPageSize() {
        return this.pageSize;
    }

    public void setPageNum(final Integer pageNum) {
        this.pageNum = pageNum;
    }

    public void setPageSize(final Integer pageSize) {
        this.pageSize = pageSize;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PageDTO)) {
            return false;
        } else {
            PageDTO other = (PageDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$pageNum = this.getPageNum();
                Object other$pageNum = other.getPageNum();
                if (this$pageNum == null) {
                    if (other$pageNum != null) {
                        return false;
                    }
                } else if (!this$pageNum.equals(other$pageNum)) {
                    return false;
                }

                Object this$pageSize = this.getPageSize();
                Object other$pageSize = other.getPageSize();
                if (this$pageSize == null) {
                    if (other$pageSize != null) {
                        return false;
                    }
                } else if (!this$pageSize.equals(other$pageSize)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PageDTO;
    }

    @Override
    public int hashCode() {
        return Objects.hash(pageNum, pageSize);
    }

    public String toString() {
        return "PageDTO(pageNum=" + this.getPageNum() + ", pageSize=" + this.getPageSize() + ")";
    }
}
